package com.tongguan.paypos.entity;

import com.google.gson.Gson;

import java.util.List;

/**
 * Created by Joylive on 2016/12/7 .
 */

public class PayTypeInfo {

    /**
     * message : 获取商户支付方式成功
     * status : 100
     * payTypes : [{"name":"微信支付","type":"WX"},{"name":"支付宝","type":"ZFB"},{"name":"现金支付","type":"XJ"},{"name":"POS刷卡","type":"POS"},{"name":"银联代扣","type":"DK"}]
     */

    private String message;
    private int status;

    /**
     * name : 微信支付
     * type : WX
     */

    private List<PayTypesBean> payTypes;

    public static PayTypeInfo objectFromData(String str) {

        return new Gson().fromJson(str, PayTypeInfo.class);
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public List<PayTypesBean> getPayTypes() {
        return payTypes;
    }

    public void setPayTypes(List<PayTypesBean> payTypes) {
        this.payTypes = payTypes;
    }

    public static class PayTypesBean {
        private String name;
        private String type;

        public static PayTypesBean objectFromData(String str) {

            return new Gson().fromJson(str, PayTypesBean.class);
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }
    }
}
